/*
 * created by dt 2025-05-08
 * 技能基类
 */
import { Entity } from "../../core/Entity";

export abstract class Skill {
    protected id: number;
    protected level: number;
    protected cooldown: number = 0;
    protected lastCastTime: number = 0;
    protected cost: number = 0;
    protected owner: Entity;
    
    constructor(id: number, level: number, owner: Entity) {
        this.id = id;
        this.level = level;
        this.owner = owner;
    }
    // 是否在冷却中
    public isInCooldown(): boolean {
        return this.cooldown > 0;
    }
}